<template>
    <div class="menu flex-column">
        <div class="menu-node" v-for="item, index in menuData" :key="index">
            <router-link :to="item.path">{{ item.name }}</router-link>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            menuData: [
                { name: "热门新闻", path: "/index" },
                { name: "数据大屏", path: "/statistics" }
            ]
        }
    },
    methods: {
    }
}
</script>

<style lang="scss" scoped>
.menu {
    background: white;

    &-node {
        height: 50px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: white;
        font-size: 16px;
        cursor: pointer;
        padding: 0 20px;
        position: relative;

        a {
            text-decoration: none;
            color: #0d6efd;
            font-weight: 600;
        }

        &:hover {
            background: green;

            a {
                color: white;
            }
        }

        &:before {
            position: absolute;
            bottom: 0;
            left: 20px;
            right: 20px;
            content: '';
            display: inline-block;
            border-bottom: 1px solid black;
            background: white;
            margin-right: 10px;
        }
    }
}
</style>